﻿//////////////////////////////////////////////////////////////////////////////////////
///// GamePlay.cs                                                     /////
///// 미니게임 선택 및 실행                                      /////
//////////////////////////////////////////////////////////////////////////////////////
using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Input.Touch;
using Microsoft.Xna.Framework.Media;

namespace Pyramid_Game
{
    class GamePlay : GameScreen
    {
        #region Declarations

        Texture2D gamePlayTexture;

        #endregion

        #region Load

        public GamePlay()   {   }
        public override void LoadContent(ContentManager content)
        {
            gamePlayTexture = content.Load<Texture2D>("Texture/gameplay");
        }

        #endregion

        #region Update & Draw

        public override void Update(Touch touch, GameTime gameTime)
        {
            Random rand = new Random(Int32.Parse(DateTime.Now.ToString("HHmmss")));

            foreach (GestureSample gesture in touch.Gestures)
            {
                if (gesture.GestureType == GestureType.Tap)
                {
                    switch (rand.Next(0, 3))
                    {
                        case 0:
                            //screenManager.AddScreen(new FlyBat());
                            break;
                        case 1:
                            screenManager.AddScreen(new CatchMummy());
                            break;
                        case 2:
                            screenManager.AddScreen(new FindOfRoom());
                            break;
                        case 3:
                            
                            break;
                        case 4:

                            break;
                        case 5:

                            break;
                        case 6:

                            break;
                    }
                    screenManager.RemoveScreen(this); 
                }
            }
        }
        public override void Draw(SpriteBatch spriteBatch, GameTime gameTime)
        {
            spriteBatch.Draw(gamePlayTexture, new Vector2(0, 0), Color.White);
        }

        #endregion
    }
}
